package com.yjd.bi.report.enums;

/**
 * <b>description</b>：bi库变更记录类型 <br>
 * <b>time</b>：2016-4-11下午5:28:40 <br>
 * <b>author</b>： ready likun_557@163.com
 */
public enum BiDataChangeRecordTypeEnum {
	ADD(1, "增加记录"), DELETE(2, "删除记录"), UPDATE(3, "更新记录");

	private Integer value;
	private String description;

	private BiDataChangeRecordTypeEnum(Integer value, String description) {
		this.value = value;
		this.description = description;
	}

	public Integer getValue() {
		return value;
	}

	public String getDescription() {
		return description;
	}

	public static BiDataChangeRecordTypeEnum get(Integer value) {
		BiDataChangeRecordTypeEnum[] enums = BiDataChangeRecordTypeEnum
				.values();
		for (BiDataChangeRecordTypeEnum enum1 : enums) {
			if (enum1.getValue().equals(value)) {
				return enum1;
			}
		}
		return null;
	}

	public static String getDesc(Integer value) {
		BiDataChangeRecordTypeEnum enum1 = BiDataChangeRecordTypeEnum
				.get(value);
		return enum1 != null ? enum1.getDescription() : null;
	}
}
